package com.sinosoft.cloud.access.handler;

import com.sinosoft.cloud.access.net.MessageObject;
import com.sinosoft.cloud.access.transformer.Trans;
import io.netty.channel.ChannelHandlerContext;

/**
 * Created by Administrator on 2018-1-10.
 */
public class AfterTransformHandler extends AbstractHandler {
    @Override
    MessageObject dealMessage(ChannelHandlerContext ctx, MessageObject messageObject) {
        Trans trans = getTrans();
        String sendToBankMsg = trans.afterTransform(messageObject.getSendToBankMsg());
        messageObject.setSendToBankMsg(sendToBankMsg);
        logger.info("返回银行前未加密的报文：" + messageObject.getSendToBankMsg());
        return messageObject;
    }
}
